#ifndef HANDLELOGINREQUEST_H
#define HANDLELOGINREQUEST_H

#include <QObject>
#include <QTcpSocket>
#include <QSqlQuery>
#include <QDebug>
#include <QCryptographicHash> //哈希
#include <QThread>
#include <QDateTime>
#include <QSqlError>

class HandleLoginRequest : public QObject {
    Q_OBJECT
public:
    HandleLoginRequest(const QString& dbPath, QObject *parent = nullptr);
    ~HandleLoginRequest();

    QString hashPassword(const QString& tempPassword);                //哈希加密

signals:
    void isLoginVerification(bool isActive, QTcpSocket *socket);         //发送验证结果

public slots:
    void LoginVerification(const QString &tempUsername, const QString &tempPassword, QTcpSocket *socket);           //服务器登录验证槽

private:
    QString m_dbPath;
};

#endif // HANDLELOGINREQUEST_H
